<template>
	<view style="width: 750rpx;height: 80vh;" class="flex-c-c-c">
		<image src="../../static/logo3.png" mode="widthFix" style="width: 140rpx;"></image>
		<text style="color: #999999;font-size: 32rpx;line-height: 200rpx;">登录信息失效或未登录</text>
		<view class="flex-c-c-c" style="width:348rpx;height: 74rpx;border-radius: 38rpx;background-color: #45806E;"
			@click="xieyi_daili = true">
			<text style="font-size: 32rpx;color: #FFFFFF;">微信授权登录</text>
		</view>


		<!-- 签署协议 -->
		<u-popup v-model="xieyi_daili" mode="bottom" border-radius="28" :safe-area-inset-bottom="true">
			<view style="padding: 48rpx 52rpx;" class="flex-c-c-s">
				<view class="flex-r-s-c" style="width: 100%;">
					<image src="/static/logo.png" mode="widthFix" style="width: 64rpx;"></image>
					<text
						style="margin-left: 40rpx;font-size: 28rpx;color: #000000;font-weight: 600;">氧发堂官方旗舰店代理升级&nbsp;&nbsp;提醒</text>
				</view>
				<text style="margin-top: 40rpx;font-size: 28rpx;color: #000000;font-weight: 600;">为给你提供更好的服务</text>
				<text style="margin-top: 30rpx;font-size: 24rpx;color: #999999;">允许我们在必要的场景下，合理使用你的个人信息，并且充分
					保障你的合法权利。</text>
				<view class="flex-r-a-c" style="width: 100%; margin-top: 20rpx;">
					<view style="color: #1565D1; font-size: 28rpx; font-weight: 500;" @tap.stop="goArticle(10)">《隐私政策》</view>
					<view style="color: #1565D1; font-size: 28rpx; font-weight: 500;" @tap.stop="goArticle(9)">《分享人协议》</view>
					<view style="color: #1565D1; font-size: 28rpx; font-weight: 500;" @tap.stop="goArticle(11)">《用户注册协议》</view>
				</view>
				<view class="flex-r-a-c" style="width: 100%;height: 80rpx;margin-top: 46rpx;">
					<!-- <text style="color: #FFFFFF;font-size: 28rpx;">下一步</text> -->
					<view @tap.stop="go(1)" style="width: 35%; height: 100%; line-height: 80rpx; text-align: center; border-radius: 4rpx; background-color: #F4F4F4; font-size: 32rpx; color: #06C160; font-weight: 500;">拒绝</view>
					<view @tap.stop="go(2)" style="width: 35%; height: 100%; line-height: 80rpx; text-align: center; border-radius: 4rpx; background-color: #06C160; font-size: 32rpx; color: #FFFFFF; font-weight: 500;">同意</view>
				</view>
			</view>
		</u-popup>

	</view>
</template>

<script>
	import user from '../../api/user_login.js'
	export default {
		data() {
			return {
				user: user,
				xieyi_daili: false
			}
		},	
		onLoad() {},
		methods: {
			login_fn() {
				console.log(666)
				let that = this
				that.user.login_user()
			},
			go(type){
				if(type == 1){
					uni.switchTab({
						url: '/pages/tabBar/home/home'
					})
				} else {
					this.xieyi_daili = false
					this.login_fn()
				}
			},
			// 查看用户协议
			goArticle(id){
				uni.navigateTo({
					url: '/mine/agreement/agreement?id=' + id
				})
			}
		},
		onBackPress(e) {
			uni.setStorage({
				key: 'isLoginPage',
				data: false,
			})
			return true;
		},
		onHide() {
			uni.setStorage({
				key: 'isLoginPage',
				data: false,
			})
		},
		onUnload() {
			uni.setStorage({
				key: 'isLoginPage',
				data: false,
			})
		}
	}
</script>

<style>

</style>
